@import "variables.less";

.filebox {
  position: relative;
  border: 1px solid @input-border-color;
  background-color: #fff;
  vertical-align: middle;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  -moz-border-radius: @input-border-radius 0 0 @input-border-radius;
  -webkit-border-radius: @input-border-radius 0 0 @input-border-radius;
  border-radius: @input-border-radius @input-border-radius @input-border-radius @input-border-radius;
  &.filebox-left{
    -moz-border-radius: 0 @input-border-radius @input-border-radius 0;
    -webkit-border-radius: 0 @input-border-radius @input-border-radius 0;
    border-radius: @input-border-radius @input-border-radius @input-border-radius @input-border-radius;
    &.filebox-no-txet{
      -moz-border-radius: @input-border-radius;
      -webkit-border-radius: @input-border-radius;
      border-radius: @input-border-radius;
    }
  }
  &.filebox-no-txet{
    -moz-border-radius: @input-border-radius;
    -webkit-border-radius: @input-border-radius;
    border-radius: @input-border-radius;
  }
  &:hover,&.filebox-hover{
    background-color: @input-active-bgcolor;
    border-color: @input-active-border-color;
  }
  &:hover{
    .filebox-text{
      background-color:#FFF;
    }
  }
  &.disabled{
    border-color:@main-disabled-border-color;
    background-color: @main-disabled-bgcolor;
    .filebox-text{
      background-color: @main-disabled-bgcolor;
      color: @input-disabled-color;
    }
  }
  .filebox-button{
    position: absolute;
    // top: -1px;
    padding: 0;
    vertical-align: top;
    border-radius: 0 0 0 0;
  }
  .filebox-button-right{
    right: 0;
  }
  .filebox-button-left{
    left: 0;
  }
  .filebox-text{
    border: 0;
    margin: 0;
    padding: 0 0 0 10px;
    white-space: normal;
    vertical-align: top;
    outline-style: none;
    resize: none;
    color: #191919;
  }
  .filebox-value {
    vertical-align: top;
    position: absolute;
    top: 0;
    left: -5000px;
  }
  &.filebox-plain{
    .filebox-button.l-btn { 
      background-color: transparent;
      .l-btn-text{
        background:transparent;
        color:#191919;
        &.l-btn-empty{
          background-color: transparent;
        }
      }
      .l-btn-icon {
        background-color: transparent;
        opacity: 1; /*0.7;*/
        filter: alpha(opacity=70);
        color:@input-iconbtn-color;
        left: 0;
      }
      
      &:hover{
        .l-btn-icon {
          color:@input-iconbtn-hover-color;
        }
      }
      &.l-btn-disabled{
        .l-btn-text{
          background: @linkbutton-disabled-bgcolor;
          &.l-btn-empty{
            background-color: transparent;
          }
        }
        .l-btn-icon {
          background-color: transparent;
          opacity: 1;
          filter: alpha(opacity=100);
          color:@input-iconbtn-disabled-color;
        }
        &:hover{
          .l-btn-text{
            color:@input-iconbtn-hover-color;
            &.l-btn-empty{
              background-color: transparent;
            }
          }
          .l-btn-icon {
            opacity: 1;
            filter: alpha(opacity=100);
          }
        }
      }
    }
  }
}
.filebox-label {
  display: inline-block;
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
  left: 0;
  top: 0;
  color: #191919;
  z-index: 10;
}

